#include <iostream>
using namespace std;
const int MAX_SIZE = 1000;
int main()
{
    int numbers[MAX_SIZE];
    // int grade_1 = 0;
    // int grade_2 = 0;
    // int grade_3 = 0;
    // int grade_4 = 0;
    // int grade_5 = 0;
    int grade[6];
    int count = 0;
    int input;
    while (count < MAX_SIZE)
    {
        cin >> input;
        if (input == -1)
        {
            break;
        }
        numbers[count] = input;
        count++;
    }
    // for (count = 0; numbers[count] == 1; count++)
    // {
    //     grade_1++;
    // }
    // for (count = 0; numbers[count] == 2; count++)
    // {
    //     grade_2++;
    // }
    // for (count = 0; numbers[count] == 3; count++)
    // {
    //     grade_3++;
    // }
    // for (count = 0; numbers[count] == 4; count++)
    // {
    //     grade_4++;
    // }
    // for (count = 0; numbers[count] == 5; count++)
    // {
    //     grade_5++;
    // }

    for (int i = 0; i < count; i++)
    {
        grade[numbers[i]]++;
    }
    printf("%d\n", count);
    printf("Grade   Count   Precent\n");
    printf("%d       %d        %d\n", 5, grade[5], static_cast<double>((grade[5]) / count) * 100);
    printf("%d       %d        %d\n", 4, grade[4], static_cast<double>((grade[4]) / count) * 100);
    printf("%d       %d        %d\n", 3, grade[3], static_cast<double>((grade[3]) / count) * 100);
    printf("%d       %d        %d\n", 2, grade[2], static_cast<double>((grade[2]) / count) * 100);
    printf("%d       %d        %d\n", 1, grade[1], static_cast<double>((grade[1]) / count) * 100);

    return 0;
}